package com.yyp.car.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.hdw.basic.dao.BaseDao;
import com.yyp.car.Idao.ITeacherDao;
import com.yyp.car.model.Teacher;

@Repository("teacherDao")
public class TeacherDao extends BaseDao<Teacher> implements ITeacherDao{

	@Override
	public List<Teacher> listTeacher() {
		String hql="from Teacher order by id asc";
		return this.list(hql);
	}

	@Override
	public Teacher findByidNumber(String idNumber) {
		String hql = "from Teacher t where t.idNumber=?";
		return (Teacher) this.queryObject(hql, idNumber);
	}

}
